<!DOCTYPE html>
<!--LJX-->
<!--LJX-->
<html lang="zh-cmn-Hans">

	<head>
		<meta charset="UTF-8">
		<link rel="shortcut icon" href="favicon.ico">
		<link rel="stylesheet" href="css/iconfont.css">
		<link rel="stylesheet" href="css/global.css">
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link rel="stylesheet" href="css/bootstrap-theme.min.css">
		<link rel="stylesheet" href="css/swiper.min.css">
		<link  rel="stylesheet"href="css/logo.css" >
		<link rel="stylesheet" href="css/styles.css">
		<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
		<script src="js/bootstrap.min.js" charset="UTF-8"></script>
		<script src="js/swiper.min.js" charset="UTF-8"></script>
		<script src="js/global.js" charset="UTF-8"></script>
		<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
		<title>XXX</title>
	
	</head>
<style type="text/css">
	
	.xuan{
		  	
		  	border:1px solid red !important;
		  	
			
		}
	#huif{
		background-color:#eee ;
		height: 90px;
		padding-top: 2px;
	}
	#value{
		height: 65px;
				margin-left: 117px;
				position: relative;
	}
	.user-icon{
		margin-top: 4px;
		border-radius:100%;
		width: 35px;
		height: 35px;
	}
	.user-icon1{
		margin-top: 4px;
		border-radius:100%;
		width: 35px;
		height: 35px;
	}
	.user-icon12{
		margin-top: 4px;
		border-radius:100%;
		width: 35px;
		height: 35px;
	}
	.user-icon13{
		margin-top: 4px;
		border-radius:100%;
		width: 35px;
		height: 35px;
	}
	#zhun{
		/*border: 1px solid red;*/
		height: 65px;
		width: 65px;
		text-align: center;
		display: inline-block;
		position: absolute;
		
	}
	.username{
		display: block;
		margin-top: 5px;
	}
	.username1{
		display: block;
		margin-top: 5px;
	}
	.username12{
		display: block;
		margin-top: 5px;
	}
	.username13{
		display: block;
		margin-top: 5px;
	}
	#hfnr{
		height: 65px;
		border: 2px solid #e0e0e0;
		display: inline-block;
		position: absolute;
		left: 80px;
		width: 740px;
		border-radius: 10px;
		padding-left: 10px;
		margin-top: 1px;
		padding-top: 5px;
	}
    .huifa{
    	position: relative;
    	bottom: 70px;
    	left: 930px;
    	margin-top: 70px;
    }
    .huifa1{
    	position: relative;
    	bottom: 70px;
    	left: 930px;
    	margin-top: 70px;
    }
    .huifa2{
    	position: relative;
    	bottom: 70px;
    	left: 930px;
    	margin-top: 70px;
    }
    .huifa3{
    	position: relative;
    	bottom: 70px;
    	left: 930px;
    	margin-top: 70px;
    }
    .huifa:hover{
    	cursor: pointer;
    }
    #shangjhuif{
    	height: 70px;
    	border: 1px solid #ccc;
    	background-color:#efecad ;
    }
    #shangjto{
    	width: 120px;
    	height: 50px;
    	float: left;
    }
    #shangjname{
    	display: block;
    	padding-left:45px ;
    	margin-top: 3px;
    }
    #shangjval{
    	height: 60px;
    	float: left;
     margin-top: 3px;
    }
	#fshuif{
		padding-top:7px ;
		background-color: #e9e099;
		display: none;
		padding-bottom: 7px;
	}
	#fshuif2{
	margin-left: 120px;
	}
	.reftime{
		padding-left: 200px;
		color: #999;
		font-size: 12px;
	}
	.reftime1{
		padding-left: 200px;
		color: #999;
		font-size: 12px;
	}
	.reftime12{
		padding-left: 200px;
		color: #999;
		font-size: 12px;
	}
	.reftime13{
		padding-left: 200px;
		color: #999;
		font-size: 12px;
	}
	.name1{
		text-align: center;
	}
	.name12{
		text-align: center;
	}
	.name13{
		text-align: center;
	}
	.eval-content{
		margin-top: 10px;
	}
  #maosha_{
    display: none;
  	width: 600px;
  	height: 30px;
  	padding: 0 10px 0 10px;
  	background-color:  #B31E22;
  }
  #maosha_ span{
  	color: beige;line-height: 30px;
  }
</style>

	<body>
		<!-- 顶部tab -->
		<div id="dingdan"></div>
		<!-- 搜索栏 -->
		<div class="top-search">
			<div class="inner">
				<a class="logo" href="index.html"><li id="logo"></li></a>
				<div class="search-box">
					
				</div>
				<div class="cart-box">
					<a href="udai_shopcart.html" class="cart-but">
						<i class="iconfont icon-shopcart cr fz16"></i> 购物车 0 件
					</a>
				</div>
			</div>
		</div>
		<!-- 内页导航栏 -->
		<div class="top-nav bg3">
			<div class="nav-box inner">
				<div class="all-cat">
					<div class="title"><i class="iconfont icon-menu"></i> 全部分类</div>
				</div>
				
				<ul class="nva-list" id="nva-list">
				
				</ul>
			</div>
		</div>
		<div class="content inner">
			<section class="item-show__div item-show__head clearfix">
				<div class="pull-left">
					<ol class="breadcrumb">
						<li>
							<a href="index.html">首页</a>
						</li>
						<li>
							<a href="item_sale_page.html">爆款推荐</a>
						</li>
						<li class="active" id="commodity_nametop"></li>
					</ol>
					<div class="item-pic__box" id="magnifier">
						
						<div class="small-box">
						<img class="cover" src=""  id="picture1_1_1">
							<span class="hover"></span>
						</div>
						<div class="thumbnail-box">
							<a href="javascript:;" class="btn btn-default btn-prev"></a>
							<div class="thumb-list">`
								<ul class="wrapper clearfix">
<!--	 	                            <li class="item active" ><video class="cover" width="420" autoplay="autoplay" controls="controls" loop="loop" ><source src="//cloud.video.taobao.com/play/u/2200667467887/p/1/e/6/t/1/280455657485.mp4" type="audio/mp4"></source><ideo></li>
-->									<li class="item" data-src="" id="picture1"><img class="cover" alt="商品预览图" id="picture1_1"></li>
									<li class="item" data-src="" id="picture2"><img class="cover" alt="商品预览图" id="picture2_2"></li>
									<li class="item" data-src="" id="picture3"><img class="cover" alt="商品预览图" id="picture3_3"></li>
									<li class="item" data-src="" id="picture4"><img class="cover" alt="商品预览图" id="picture4_4"></li>
									<!--<li class="item" data-src="" id="picture5"><img class="cover" alt="商品预览图" id="picture5_5"></li>
									<li class="item" data-src="" id="picture6"><img class="cover" alt="商品预览图" id="picture6_6"></li>-->
								</ul>
							</div>
						</div>
						<div class="big-box">
							<img src= "" id="bigpicture" >
						</div>
						<br />
						<br />
						<a href="#" class="btn btn-default btn-next" onclick="shoucang()">收藏商品★</a>
					</div>
					
					<script src="js/jquery.magnifier.js"></script>
					<script>
						$(function() {
							$('#magnifier').magnifier();
						});
					</script>
					<div class="item-info__box">
						<div class="item-title">
							<div class="commodity_name" id="commodity_name" style="font-size: 30px;"></div>
							<div class="sale cr" id="commodity_description"></div>
						</div>
						<span id="maosha_">
							<span id="" style="">
								秒杀
							</span>
							
							<div id="timer"  style="float: right; color: beige;">

							</div>
						</span>
						<div class="item-price bgf5">
							<div class="price-box clearfix">
								<div class="price-panel pull-left">
									售价：<span class="price">￥<span id="shoppricezhekou"></span> </span><s class="fz16 c9">￥<span id="shopprice"></span></s>
								</div>
								<script>
									// 会员价格折叠展开
									$(function() {
										$('.vip-price-panel').click(function() {
											if($(this).hasClass('active')) {
												$('.all-price__box').stop().slideUp('normal', function() {
													$('.vip-price-panel').removeClass('active').find('.iconfont').removeClass('icon-up').addClass('icon-down');
												});
											} else {
												$(this).addClass('active').find('.iconfont').removeClass('icon-down').addClass('icon-up');
												$('.all-price__box').stop().slideDown('normal');
											}
										});
									});
								</script>
								<script>
									
									function getCookie(cookieName) {
    var strCookie = document.cookie;
    var arrCookie = strCookie.split("; ");
    var picture ="";
    for(var i = 0; i < arrCookie.length; i++){
        var arr = arrCookie[i].split("=");
        if(cookieName == arr[0]){
            return arr[1];
        }
    }
    return "";
}
									
									var id = eval( decodeURIComponent(location.search.slice(1).split("=")[1]) ) ;
									var category_id = eval( decodeURIComponent(location.search.slice(1).split("=")[2]) ) ;
									var userid = getCookie("userid");
						
									$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectgoods",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id: id
										},
										success: function(Mall_Data) {

											$("#commodity_nametop").text(Mall_Data.data[0].commodity_name);
											$("#commodity_name").text(Mall_Data.data[0].commodity_name);
											$("#commodity_description").text(Mall_Data.data[0].commodity_description);
											$("#xiangqin").text(Mall_Data.data[0].commodity_description);
											$("#shopprice").text(Mall_Data.data[0].commodity_price);
											$("#shoppricezhekou").text(Mall_Data.data[0].commodity_price);		
											$("#commodity_picture").attr('src', Mall_Data.data[0].commodity_picture);
											$("#sales_volume").text(Mall_Data.data[0].sales_volume);
											
											
											
										}
									})

									$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectpicture",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id: id
										},
										success: function(Mall_Data) {
											$("#bigpicture").attr('src', Mall_Data.data[0].picture_path_name);
											$("#picture1").attr('data-src', Mall_Data.data[0].picture_path_name);
											$("#picture2").attr('data-src', Mall_Data.data[1].picture_path_name);
											$("#picture3").attr('data-src', Mall_Data.data[2].picture_path_name);
											$("#picture4").attr('data-src', Mall_Data.data[3].picture_path_name);
//											$("#picture5").attr('data-src', Mall_Data.data[4].picture_path_name);
//											$("#picture6").attr('data-src', Mall_Data.data[5].picture_path_name);
											$("#picture1_1").attr('src', Mall_Data.data[0].picture_path_name);
											$("#picture2_2").attr('src', Mall_Data.data[1].picture_path_name);
											$("#picture3_3").attr('src', Mall_Data.data[2].picture_path_name);
											$("#picture4_4").attr('src', Mall_Data.data[3].picture_path_name);
//											$("#picture5_5").attr('src', Mall_Data.data[4].picture_path_name);
//											$("#picture6_6").attr('src', Mall_Data.data[5].picture_path_name);
											$("#picture1_1_1").attr('src', Mall_Data.data[0].picture_path_name);
											$("#ppicture1").attr('src', Mall_Data.data[0].picture_path_name);
											$("#ppicture2").attr('src', Mall_Data.data[1].picture_path_name);
											$("#ppicture3").attr('src', Mall_Data.data[2].picture_path_name);
											$("#ppicture4").attr('src', Mall_Data.data[3].picture_path_name);
											

										}
									})		
									


								</script>
							</div>
							<div class="c6">普通会员限购 2 件，想要<u class="cr"><a href="index.html">购买更多</a></u>？</div>
						</div>
						<ul class="item-ind-panel clearfix">
							<li class="item-ind-item">
								<span class="ind-label c9">累计销量：</span>
								<span class="ind-count cr" id="sales_volume"></span>
							</li>
							<li class="item-ind-item">
								<a href=""><span class="ind-label c9">累计评论：</span>
									<span class="ind-count cr" id="pl">0</span></a>
							</li>
						</ul>
							<div class="item-sku">
							<dl class="item-prop clearfix">
								<dt class="item-metatit" id="color"></dt>
								<dd><ul data-property class="clearfix two"  id="colorbox" >

								</ul></dd>
							</dl>
							<dl class="item-prop clearfix">
								<dt class="item-metatit" id="er"></dt>
								<dd><ul class="clearfix two" id="erbox">
									
								</ul></dd>
							</dl>
							
							<dl class="item-prop clearfix">
								<dt class="item-metatit" id="san"></dt>
								<dd><ul class="clearfix two" id="sanbox">
									
								</ul></dd>
							</dl>
							
							<dl class="item-prop clearfix">
								<dt class="item-metatit" id="si"></dt>
								<dd><ul class="clearfix two" id="sibox">
									
								</ul></dd>
							</dl>
						</div>
						<script type="text/javascript">
//							for (var i = 0; i < res.data.length; i++) {
//								
//							for (var j = 0; j < res.data[i].length; j++) {
//								
//									str="			<dl class="item-prop clearfix">
//								<dt class="item-metatit" id="color">+res.data[i]+</dt>
//								<dd>
//								''<ul data-property class=\"clearfix two\"  id=\"box"++" \" >"
//
//								</ul></dd>
//								
//							</dl>"
//							
//							}

function getCookie(cookieName) {
    var strCookie = document.cookie;
    var arrCookie = strCookie.split("; ");
    for(var i = 0; i < arrCookie.length; i++){
        var arr = arrCookie[i].split("=");
        if(cookieName == arr[0]){
            return arr[1];
        }
    }
    return "";
}
									
									var id = eval( decodeURIComponent(location.search.slice(1).split("=")[1]) ) ;
var userid = getCookie("userid");

						var color ="";
							var er = "";
							var san = "";
							var si = "";
							var all="";
							var attribute="";
							var leixin="";
							
							
						

					
							$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectconfiguration_type",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id: id
										},
										success: function(Mall_Data) {
									if (Mall_Data.data.length==1) {
										document.getElementById("color").innerHTML=Mall_Data.data[0].configuration_type;
									}else if(Mall_Data.data.length==2){
										document.getElementById("color").innerHTML=Mall_Data.data[0].configuration_type;
										document.getElementById("er").innerHTML=Mall_Data.data[1].configuration_type;
									}else if(Mall_Data.data.length==3){
										document.getElementById("color").innerHTML=Mall_Data.data[0].configuration_type;
										document.getElementById("er").innerHTML=Mall_Data.data[1].configuration_type;
										document.getElementById("san").innerHTML=Mall_Data.data[2].configuration_type;
									}else if(Mall_Data.data.length==4){
										document.getElementById("color").innerHTML=Mall_Data.data[0].configuration_type;
										document.getElementById("er").innerHTML=Mall_Data.data[1].configuration_type;
										document.getElementById("san").innerHTML=Mall_Data.data[2].configuration_type;
										document.getElementById("si").innerHTML=Mall_Data.data[3].configuration_type;
									}
											
											
											
											all=Mall_Data.data.length;
									color = document.getElementById("color").innerText;
						er = document.getElementById("er").innerText;
						 san = document.getElementById("san").innerText;
						  si = document.getElementById("si").innerText;
						 
						 
												$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectcolor",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id:id,
											color: color
										},
										success: function(Mall_Data) {
											str = "";
											for(var i = 0; i < Mall_Data.data.length; i++) {
												str = "<li><a  href='javascript:;' role='button' aria-disabled='true' class='one' onclick='check(this)'>" + Mall_Data.data[i].config_details + "</a></li>"
												$("#colorbox").append(str);
											}
										}
									})
												
												$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selecter",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id:id,
											er: er
										},
										success: function(Mall_Data) {
											str = "";
											for(var i = 0; i < Mall_Data.data.length; i++) {
												str = "<li><a  href='javascript:;' role='button' aria-disabled='true' class='one' onclick='check(this)'>" + Mall_Data.data[i].config_details + "</a></li>"
												$("#erbox").append(str);
											}
										}
									})
									
									
									$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectsan",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id:id,
											san: san
										},
										success: function(Mall_Data) {
											str = "";
											for(var i = 0; i < Mall_Data.data.length; i++) {
												str = "<li><a  href='javascript:;' role='button' aria-disabled='true' class='one' onclick='check(this)' >" + Mall_Data.data[i].config_details + "</a></li>"
												$("#sanbox").append(str);
											}
										}
									})
									
									
									$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectsi",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id:id,
											si: si
										},
										success: function(Mall_Data) {
											str = "";
											for(var i = 0; i < Mall_Data.data.length; i++) {

												str = "<li><a  href='javascript:;' role='button' aria-disabled='true' class='one' onclick='check(this)'>" + Mall_Data.data[i].config_details + "</a></li>"
												$("#sibox").append(str);
											}
										}
									})
										}
									})
							
							
							
							if (getCookie("userid")==null) {　
							}else{
//								alert(id);
//								alert(getCookie("userid"));
//								alert(category_id);
								$.ajax({
										type: "post",
										url: "http://localhost:16111/user/insert_my_tracks",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											footprint_id:id,
											user_id:getCookie("userid"),
											goods_type:category_id
										},
										success: function(Mall_Data) {
											
											}
									})
								}

							
							
//									$.ajax({
//										type: "post",
//										url: "http://localhost:16111/goods/selectcolor",
//										dataType: "json",
//										data: {
//											id:id,
//											color: color
//										},
//										success: function(Mall_Data) {
//											str = "";
//											for(var i = 0; i < Mall_Data.data.length; i++) {
//												str = "<li><a  href='javascript:;' role='button' aria-disabled='true' class='one' onclick='check(this)'>" + Mall_Data.data[i].config_details + "</a></li>"
//												$("#colorbox").append(str);
//											}
//										}
//									})
									
									
									
							


                                     function shoucang()
                                     {
                                     	
                                     	$.ajax({
										type: "post",
										url: "http://localhost:16111/user/insert_collect_goods",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											footprint_id:id,
											user_id:getCookie("userid"),
										
										},
										success: function(Mall_Data) {

											if(Mall_Data.data==1){
												return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "收藏成功！！"　　
														});
											}else if(Mall_Data.error == "商品已添加"){
												return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "该商品已被您收藏！！"　　
														});
											}
											}
									})
                                     }
                                     	
                                     	
                     
                                function check(obj) {
                                	var x = $(obj).closest("ul").find(".one");
                                	 for (var i = 0; i <x.length ; i++) {
                                	 	x[i].classList.remove("xuan");
                                	 }
                                	$(obj).addClass("xuan");

                                	var y = document.querySelectorAll(".xuan");
                                	if (y.length==all) {
                                		for (var j = 0; j < y.length; j++) {
                                		attribute +=  y[j].innerText;
                                	    leixin = attribute;
                                	  
                                	}
                                	}
                                		$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectpirce",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id:id,
											attribute:attribute
										},
										success: function(Mall_Data) {
											$("#shopprice").text(Mall_Data.data[0].price);
											var zhekopirce = Mall_Data.data[0].price;
											attribute="";
											
											$.ajax({
										type: "post",
										url: "http://localhost:16111/user/select_user_member_zeko",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											userid: getCookie("userid")
										},
										success: function(Mall_Data) {					
											$("#shoppricezhekou").text(parseInt(Mall_Data.data * zhekopirce) );							
										}
									})
											
											
											}
									})
                                		$.ajax({
										type: "post",
										url: "http://localhost:16111/goods/selectstock",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
											id:id,
											attribute:attribute
										},
										success: function(Mall_Data) {
											$("#stock").text(Mall_Data.data[0].stock);
											attribute="";
											}
									})
                                }
                                                  
//                              function xxx (){
//                              	var x = document.querySelectorAll(".xuan");
//                              		for (var i = 0; i < x.length; i++) {
//                              		lx +=  x[i].innerText;
//                              	}
//                              		alert(lx)
//                              }
                                					
						</script>
							<div class="item-amount clearfix bgf5">
								<div class="item-metatit">数量：</div>
								<div class="amount-box">
									<div class="amount-widget">
										<input class="amount-input" value="1" maxlength="8" title="请输入购买量" type="text" id="quantity">
										<div class="amount-btn">
											<a class="amount-but add"></a>
											<a class="amount-but sub"></a>
										</div>
									</div>
									<div class="item-stock"><span style="margin-left: 10px;">库存 <b id="stock">1</b> 件</span></div>
									<script>
										
										
										$(function() {
											
											$('.amount-input').onlyReg({
												reg: /[^0-9]/g
											});
											$('.amount-widget').on('click', '.amount-but', function() {
												var stock = document.getElementById("stock").innerHTML;
												var num = parseInt($('.amount-input').val());
												var numm = document.getElementById("quantity").value;
												if(!num) num = 0;
												if (numm == 0) {
													document.getElementById("quantity").value='1';
													return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "您输入的数量有误"　　
														});
												}
												if (num > stock) {
													document.getElementById("quantity").value='1';
												}
												if($(this).hasClass('add')) {
													if(num > stock -1) {
														return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "您输入的数量超过库存上限"　　
														});
													}
													$('.amount-input').val(num + 1);
												} else if($(this).hasClass('sub')) {
													if(num == 1) {
														return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "您输入的数量有误"　　
														});
													}
													$('.amount-input').val(num - 1);
												}
											});
										});
									</script>
								</div>
							</div> 
							
							<div class="item-action clearfix bgf5">
								<a href="javascript:;" rel="nofollow" data-addfastbuy="true" title="点击此按钮，到下一步确认购买信息。"class="item-action__buy" role="button"  >立即购买</a>
								<a href="javascript:;" rel="nofollow" data-addfastbuy="true" role="button" class="item-action__basket">
									<i class="iconfont icon-shopcart"></i> 加入购物车
								</a>
								<script>
									
										$(".item-action__buy").click(function(){
											var userid = getCookie("userid");
											var x = document.querySelectorAll(".xuan");
											var stock = document.getElementById("stock").innerHTML;
												var num = parseInt($('.amount-input').val());
												var numm = document.getElementById("quantity").value;				
												if (numm == 0) {
													document.getElementById("quantity").value='1';
													return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "您输入的数量有误"　　
														});
												}
												if (num > stock) {
													document.getElementById("quantity").value='1';
													return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "您输入的购买数量有误！！"　　
														});
												}
											if (getCookie("userid")==null) {
											return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "请先登录！",　　
															
													});
													window.location.href="login.html"
											}else if (x.length<all) {
                                		return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "请选择您要的商品类型！"　　
														});
                               }
											window.location.href="udai_shopcart_pay.html?quantity="+$(".amount-input").val()+"&commodity_picture="+$("#picture1_1_1").attr("src")+"&commodity_nametop="+escape($("#commodity_nametop").text())+"&shoppricezhekou="+$("#shoppricezhekou").text()+"&leixin="+escape(leixin)+"&commodity_description="+escape($("#commodity_description").text())+"&id="+id+"&status="+1
									
										})
										
										$(".item-action__basket").click(function(){
											var x = document.querySelectorAll(".xuan");
											if (getCookie("userid")==null) {
											return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "请先登录！！！",　
															　
													});
													window.location.href="login.html"
											}else if (x.length<all) {
                                		return DJMask.open({　　
															width: "300px",
															　　height: "100px",
															　　content: "您还未选择商品类型！！！"　　
														});
                                }	
//											window.location.href="place_order.html?quantity="+$(".amount-input").val()+"&commodity_picture="+$("#picture1_1_1").attr("src")+"&commodity_nametop="+escape(c)+"&shoppricezhekou="+$("#shoppricezhekou").text()+"&leixin="+escape(leixin)+"&commodity_description="+escape($("#commodity_description").text())+"&id="+id
									    $.ajax({
										type: "post",
										url: "http://localhost:16111/pay/pay/addshopping",
										dataType: "json",
										xhrFields:{withCredentials: true},
										data: {
			user_id:getCookie("userid"),
			commodity_id:id,
			commodity_picture:$("#picture1_1_1").attr("src"),
			commodity_nametop:$("#commodity_nametop").text(),
			commodity_leixin:leixin,
			commodity_description:$("#commodity_description").text(),
			quantity_of_goods:$(".amount-input").val(),
			shopping_Cart_money: $("#shoppricezhekou").text() * $(".amount-input").val(),
			collection_item_price:$("#shoppricezhekou").text(),
										},
										success: function(Mall_Data) {
											window.location.href="udai_shopcart.html"
											}
									})
										})
										
									</script>

							</div>
						</div>
					</div>
				</div>
				<script>
						$(document).ready(function() {
							// 顶部banner轮播
							var picked_swiper = new Swiper('.picked-swiper', {
								loop: true,
								direction: 'vertical',
								prevButton: '.picked-button-prev',
								nextButton: '.picked-button-next',
							});
						});
					</script>
			</section>
<br />
<br />
<br />
<br />
<br />
<br />
		<section class="item-show__div item-show__body posr clearfix" style="width: 1200px;margin: auto;">
		<section class="item-show__div item-show__body posr clearfix" style="width: 1200px;margin:auto">
			<div class="item-nav-tabs">
				<ul class="nav-tabs nav-pills clearfix" role="tablist" id="item-tabs">
					<li role="presentation" class="active"><a href="#detail" role="tab" data-toggle="tab" aria-controls="detail" aria-expanded="true">商品详情</a></li>
					<li role="presentation"><a href="#evaluate" role="tab" data-toggle="tab" aria-controls="evaluate">累计评价 <span class="badge" id="whole">0</span></a></li>
					<li role="presentation"><a href="#service" role="tab" data-toggle="tab" aria-controls="service">售后服务</a></li>
				</ul>
			</div>
			<div class="pull-left">
				<div class="tab-content">
					<div role="tabpanel" class="tab-pane fade in active" id="detail" aria-labelledby="detail-tab">
						<div class="item-detail__info clearfix" style="text-align: center;">
							<div class="record" id="xiangqin" style="font-size: 15px ;" ></div>
						</div>
						<div class="rich-text">
							<p style="text-align: center;">
								<img src="" id="ppicture1"><br>
								<img src="" id="ppicture2"><br>
								<img src="" id="ppicture3"><br>
								<img src="" id="ppicture4"><br>
							</p>
						</div>
					</div>
   					<div role="tabpanel" class="tab-pane fade" id="evaluate"  aria-labelledby="evaluate-tab">
						<div class="evaluate-tabs bgf5">
							<ul class="nav-tabs nav-pills clearfix" role="tablist">
								<li role="presentation" class="active"><a href="#all" role="tab" data-toggle="tab" aria-controls="all" aria-expanded="true" onclick="qb()">全部评价 <span class="badge" id="qbbj">1314</span></a></li>
								<li role="presentation"><a href="#good" role="tab" data-toggle="tab" aria-controls="good" onclick="hpq(1)">好评 <span class="badge" id="hp" >1000</span></a></li>
								<li role="presentation"><a href="#normal" role="tab" data-toggle="tab" aria-controls="normal"onclick="zpq(2)" >中评 <span class="badge" id="zp" >314</span></a></li>
								<li role="presentation"><a href="#bad" role="tab" data-toggle="tab" aria-controls="bad" onclick="cpq(3)">差评 <span class="badge" id="cp" >0</span></a></li>
							</ul>
						</div>
						<script type="text/javascript">
						//var userid=1;
					var userid=getCookie("userid");
						
						var shangpida = eval( decodeURIComponent(location.search.slice(1).split("=")[1]) ) ;
						//	var shangpida=25;	
						
                     //     alert(userid);
                       //var shangpida=localStorage.getItem("shangpid");
                        //var  shangpida=1;
						var whole=document.getElementById("whole");//全部评论
						var qbbj=document.getElementById("qbbj");//全部评论
						var hp=document.getElementById("hp");//好评
						var zp=document.getElementById("zp");//中评
						var cp=document.getElementById("cp");//差评
						var pl=document.getElementById("pl");//全部评论
						
					/*	var data={
							'id':shangpida
						}*/
						//alert(shangpida);
					    $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectgrade",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida
					    	},
					        success:function(a) {
					        	whole.innerHTML=a[0].id;//全部评论
					        	pl.innerHTML=a[0].id;
					        	qbbj.innerHTML=a[0].id;//全部评论
					        	hp.innerHTML=a[1].id;//好评
					        	zp.innerHTML=a[2].id;//中评
					        	cp.innerHTML=a[3].id;//差评
					        } 
					        
					       
					    	
					    	
					    });
					        
					        var o="";
					        var v="";
					        var s="";
					        var h="";
					        var jie="";
					       s="<div id='shangjhuif'><div id='shangjto'><span id='shangjname'>商家回复：</span></div><div id='shangjval' class='shangjhuif'>亲爱的顾客,您的信任是对小店最大的支持,希望小店能给您带来快乐和希望！</div></div>";
					
					        v="<div id='huif'><div id='value'>"+
					       	"<div id='zhun'>"+
					       	"<img src='' class='user-icon'>"+
					       	"<span class='username'>123456</span>"+
					        "</div>"+
					        "<div id='hfnr' class='hfnr1'>买家进入详情页查看，肯定是想看到有关这件商品的更加细致的地方，只有宝贝真的各方面都符合要求之后才会有想要购买的欲望，所以建议商家在详情页第一个模块先进行简短</div>"+
					      "</div>"+"<div class='reftime'>sdafsadfasdfsad</div>"+"</div>"; 
					      o="<div class='eval-box'><div class='eval-author'>"+
						            "<div class='port'><img src='' alt='欢迎来到XXX' class='cover b-r50' ></div>"+"<div class='name'>高***恒</div>"+
										"</div>"+"<div class='eval-content'>"+
											"<div class='eval-text' id='neir'>真是特别美_回头穿了晒图</div>"+
											"<div class='eval-imgs'>"+
										"</div>"+
											"<div class='eval-time'><span class='pltime'>2017年08月11日 20:31</span></div>"
										+"</div>"+""+"</div>";
				
				
				
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontent",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;	
					      
					        	
					        for(var i in data){
					        	//alert(i);
					        //	alert(data[i].icon);
					        	var safa="<a class='huifa' onclick='huif("+data[i].id+")'>回复</a>";
					        	var diva="<div id='fshuif' class='fsval'><div id='fshuif2'><input type='text' class='texttsval'> <input type='button' value='发送' onclick='fason("+data[i].id+")'> <input type='button' value='取消' onclick='ychuif("+data[i].id+")'> </div></div>";
					        	//alert(data[i].id);
					        	jie+=o;
					        	jie+=safa;
					        	jie+=diva;
					          
					       var shangjgoto=data[i].shop_replies;  
					 for(var n in shangjgoto){
					 	if(shangjgoto[n]!=null){
					 		jie+=s;	  
				            
					 	}
					 }
				go=data[i].zilist;
					        for(var j in go){ 
					        if(go[j]!=null){
					      //  alert(j);
					        jie+=v;
                                
					        //	alert(go[j].name);
					        	//alert(go[j].icon);
					       
					        }else{
					        	jie+="";
					        }
					          
					        	//alert(go[j].reply_content);
					        }
					        
					    
					        
					        
					      $("#all").html(jie);
					        
					        } 
					
					       var usericon=document.getElementsByClassName("user-icon");
					       var name=document.getElementsByClassName("username");
					       var hfnr=document.getElementsByClassName("hfnr1");
					       var reftime=document.getElementsByClassName("reftime");
					   	   var shangjhuif1=document.getElementsByClassName("shangjhuif");
					      
					       
					       
					        var w=[];
					        var icon=[];
					        var namezu=[];
					        var neirzu=[];
					        var time=[];
					        var timego2=[];
					        var ds=[];
					        var nei;
					        
					        for(var g in b){
					        var z=b[g].zilist;
					        var zd=b[g].shop_replies;
					        for(var h in z){ 
					         var max=Math.max.apply(null,w);
					        // alert(w.length+1);
					        	w.push(z[h].user_id);
					        	icon.push(z[h].user_img);
					        	namezu.push(z[h].user_name);
					        	neirzu.push(z[h].reply_content);
					        	time.push(new Date(z[h].comment_time));
					        	
					      //    var max=Math.max.call(null,...w); 	
					        
					  	    
					        var year=time[h].getFullYear();//得到年
					        var month=time[h].getMonth();//得到月
					        var day=time[h].getDay();//得到日
					        var xh=time[h].getHours();//得到小时
					        var fen=time[h].getMinutes();//得到分
					        var timego=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;	
					        timego2.push(timego);
					      for (var j=0;j<w.length;j++) {
					   //    alert(usericon[j].src);
					     // alert(icon[j]);
 					      	usericon[j].src=icon[j];
					      	name[j].innerHTML=namezu[j];
                            hfnr[j].innerHTML=neirzu[j];	
                            reftime[j].innerHTML=timego2[j];
					      }
					      
					  	}	
					  	for(var dsq in zd){
					      	ds.push(zd[dsq].reply_content);
					      }
					      for(var dj=0;dj<ds.length;dj++){
					      	shangjhuif1[dj].innerHTML=ds[dj];
					      	
					      }
					      
					        					         
					       for (var i = 0; i < b.length; i++) {
					       
					        var icon1=document.getElementsByClassName("cover b-r50");
					       // icon1[i].src='';
					    //   $(".cover b-r50").attr("src",b[i].icon);
					       	icon1[i].src=b[i].user_img;
					       	//alert(icon1.src);
					       	var username=document.getElementsByClassName("name");
					       	username[i].innerHTML=b[i].user_name;
					       	 	var plnr=document.getElementsByClassName("eval-text");
					        plnr[i].innerHTML=b[i].comment_content;
					        var pltime=document.getElementsByClassName("pltime");
					       
					        var ptime=b[i].comment_time;
					        var pxtime=new Date(ptime); 
					        var year=pxtime.getFullYear();//得到年
					        var month=pxtime.getMonth();//得到月
					        var day=pxtime.getDay();//得到日
					        var xh=pxtime.getHours();//得到小时
					        var fen=pxtime.getMinutes();//得到分
					        var pxotime=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;
					        //alert(pxotime);
					        pltime[i].innerHTML=pxotime;
					                    
				
					      
					       }
			
					        } 
	    	
					    	
					    }
					        });
				jie="";	    
					    
					    
					    function qb(){
					    	
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontent",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;	
					     //  alert
					        	
					        for(var i in data){
					        //	alert(data[i].icon);
					        	var safa="<a class='huifa' onclick='huif("+data[i].id+")'>回复</a>";
					        	var diva="<div id='fshuif' class='fsval'><div id='fshuif2'><input type='text' class='texttsval'> <input type='button' value='发送' onclick='fason("+data[i].id+")'> <input type='button' value='取消' onclick='ychuif("+data[i].id+")'> </div></div>";
					        	//alert(data[i].id);
					        	jie+=o;
					        	jie+=safa;
					        	jie+=diva;
					 var shangjgoto=data[i].shop_replies;  
					 for(var n in shangjgoto){
					 	if(shangjgoto[n]!=null){
					 		jie+=s;	  
				            
					 	}
					 }
					         go=data[i].zilist;
					        for(var j in go){
					        if(go[j]!=null){
					        jie+=v;
                                
					        //	alert(go[j].name);
					        	//alert(go[j].icon);
					       
					        }else{
					        	jie+="";
					        }
					          
					        	//alert(go[j].reply_content);
					        }
					      $("#all").html(jie);
					        
					        } 
					
					       var usericon=document.getElementsByClassName("user-icon");
					       var name=document.getElementsByClassName("username");
					       var hfnr=document.getElementsByClassName("hfnr1");
					       var reftime=document.getElementsByClassName("reftime");
					       	   var shangjhuif1=document.getElementsByClassName("shangjhuif");
					      
					       
					        var w=[];
					        var icon=[];
					        var namezu=[];
					        var neirzu=[];
					        var time=[];
					        var timego2=[]
					        var nei;
					         var ds=[];
					        for(var g in b){
					        var z=b[g].zilist;
					         var zd=b[g].shop_replies;
					        for(var h in z){ 
					         var max=Math.max.apply(null,w);
					        	w.push(z[h].user_id);
					        	icon.push(z[h].user_img);
					        	namezu.push(z[h].user_name);
					        	neirzu.push(z[h].reply_content);
					        	time.push(new Date(z[h].comment_time));
					      //    var max=Math.max.call(null,...w); 	
					        
					  	    
					        var year=time[h].getFullYear();//得到年
					        var month=time[h].getMonth();//得到月
					        var day=time[h].getDay();//得到日
					        var xh=time[h].getHours();//得到小时
					        var fen=time[h].getMinutes();//得到分
					        var timego=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;	
					        timego2.push(timego);
					        	
					      for (var j=0;j<w.length;j++) {
					   //    alert(usericon[j].src);
					     // alert(icon[j]);
 					      	usericon[j].src=icon[j];
					      	name[j].innerHTML=namezu[j];
                            hfnr[j].innerHTML=neirzu[j];	
                            reftime[j].innerHTML=timego2[j];
					      } 
					      }
                          for(var dsq in zd){
					      	ds.push(zd[dsq].reply_content);
					      }
					      for(var dj=0;dj<ds.length;dj++){
					   //   	alert(shangjhuif1[dj].innerHTML);
					      	shangjhuif1[dj].innerHTML=ds[dj];
					      }
					       	}
					        					         
					       for (var i = 0; i < b.length; i++) {
					       
					        var icon1=document.getElementsByClassName("cover b-r50");
					       // icon1[i].src='';
					    //   $(".cover b-r50").attr("src",b[i].icon);
					       	icon1[i].src=b[i].user_img;
					       	var username=document.getElementsByClassName("name");
					       	username[i].innerHTML=b[i].user_name;
					       	 	var plnr=document.getElementsByClassName("eval-text");
					        plnr[i].innerHTML=b[i].comment_content;
					        var pltime=document.getElementsByClassName("pltime");
					       
					        var ptime=b[i].comment_time;
					        var pxtime=new Date(ptime); 
					        var year=pxtime.getFullYear();//得到年
					        var month=pxtime.getMonth();//得到月
					        var day=pxtime.getDay();//得到日
					        var xh=pxtime.getHours();//得到小时
					        var fen=pxtime.getMinutes();//得到分
					        var pxotime=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;
					        //alert(pxotime);
					        pltime[i].innerHTML=pxotime;
					                    
				
					      
					       }
			
					        } 
	    	
					    	
					    });
					    
					    
					    jie="";
					    	
					    }
					    
					    
					    //全
					    function huif(x) {
					    //	alert(x);
					    	        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontent",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
					        var val=document.getElementsByClassName("texttsval");
					        var d1=document.getElementsByClassName("fsval");
					    	if(data[i].id==x){
					    	d1[i].style.display='block';
					    	val[i].placeholder="@"+data[i].user_name ;
					    			
					    	}
					    	else{
					    		d1[i].style.display='none';
					    		val[i].value="";
					    	}
					    	
					        }
					       }				        
					        
					        });
					    }
					 		    
		  function fason(userida) {
					        
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontent",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
					        var val=document.getElementsByClassName("texttsval");
					        	         var q=document.getElementsByClassName("fsval");
					    	if(data[i].id==userida){
					        var textvalue=val[i].value;
					        sc(userida,textvalue);
					        val[i].value="";
					    	q[i].style.display="none";
					    	}
					        }
					       }
					        });
					    }
		  	    
					    function ychuif(x) {
					    	 $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontent",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    	},
					        success:function(b) {
					        	   var data=eval(b);
					        var go;
					    	//alert(x);
					    	for(var i in data){
					    	if(data[i].id==x){
					    	var d1=document.getElementsByClassName("fsval");
					    	
					    	d1[i].style.display='none';
					    	d1[i].value="";
					    	
					    }
					    	}
					    	}
					        });
					    	  
					    }
					    //好评
					    
	      function huif1(x) {
					    //	alert(x);
					    	        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:1
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
					        var val=document.getElementsByClassName("texttsval2");
					        var d1=document.getElementsByClassName("fsval2");
					    	if(data[i].id==x){
					    	d1[i].style.display='block';
					    	val[i].placeholder="@"+data[i].user_name ;
					    	}
					    	else{
					    		d1[i].style.display='none';
					    		val[i].value="";
					    	}
					    	
					    	
					        }
					       }				        
					        });
					    }
	      function ychuif1(x) {
					    	 $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:1
					    	},
					        success:function(b) {
					        	   var data=eval(b);
					        var go;
					    	//alert(x);
					    	for(var i in data){
					    	if(data[i].id==x){
					    	var d1=document.getElementsByClassName("fsval2");
					    	
					    	d1[i].style.display='none';
					    	d1[i].value="";
					    	
					    }
					    	}
					    	}
					        });
					    	  
					    }
	      					 		    
		  function fason1(userida) {
					        
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:1
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
					        var val=document.getElementsByClassName("texttsval2");
					        	         var q=document.getElementsByClassName("fsval2");
					    	if(data[i].id==userida){
					        var textvalue=val[i].value;
					         sc(userida,textvalue);
					           val[i].value="";
					    	q[i].style.display="none";
					         
					    	}
					        }
					       }
					        });
					    }
	      
	      //中评
	          function huif2(x) {
					    	
					    	        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:2,
					    	},
					        success:function(b) {
					        var data=eval(b);
					        
					        for(var i in data){
					      //  alert(data[i].id);
					        var val=document.getElementsByClassName("texttsval3");
					        var d1=document.getElementsByClassName("fsval3");
					    	if(data[i].id==x){
					    	d1[i].style.display='block';
					    	val[i].placeholder="@"+data[i].user_name;
					    	}
					    	else{
					    		d1[i].style.display='none';
					    		val[i].value='';
					    	
					    	}
					        }
					       }				        
					        });
					    }
	      function ychuif2(x) {
	      	//alert(x);
					    	 $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:2
					    	},
					        success:function(b) {
					        	   var data=eval(b);
					    //	alert(b);
					    	for(var i in data){
					    	if(data[i].id==x){
					    	var d2=document.getElementsByClassName("fsval3");
				          // alert(d2);
					    	d2[i].style.display='none';
					    	d2[i].value="";
					    	
					    }
					    	}
					    	}
					        });
					    	  
					   } 
					   	  function fason2(userida) {
					        
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:2
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
					        var val=document.getElementsByClassName("texttsval3");
					         var q=document.getElementsByClassName("fsval3");
					    	if(data[i].id==userida){
					        var textvalue=val[i].value;
					         sc(userida,textvalue);
					         val[i].value="";
					    	q[i].style.display="none";
					    	}
					        }
					       }
					        });
					    }
					   
	      //差评
	          function huif3(x) {
					    	
					    	        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:3,
					    	},
					        success:function(b) {
					        var data=eval(b);
					        
					        for(var i in data){
					      //  alert(data[i].id);
					        var val=document.getElementsByClassName("texttsval4");
					        var d1=document.getElementsByClassName("fsval4");
					    	if(data[i].id==x){
					    	d1[i].style.display='block';
					    	val[i].placeholder="@"+data[i].user_name ;
					    	}  
					    	
					    	else{
					    		d1[i].style.display='none';
					    		val[i].value='';
					    	}
					    	
					        }
					       }				        
					        });
					    }
	          	      function ychuif3(x) {
	      	//alert(x);
					    	 $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:3
					    	},
					        success:function(b) {
					        	   var data=eval(b);
					    //	alert(b);
					    	for(var i in data){
					    	if(data[i].id==x){
					    	var d2=document.getElementsByClassName("fsval4");
				          // alert(d2);
					    	d2[i].style.display='none';
					    	d2[i].value="";
					    	
					    }
					    	}
					    	}
					        });
					    	  
					   } 
					   	 function fason3(userida) {
					        
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:3
					    	},
					        success:function(b) {
					        var data=eval(b);
					        var go; 
					        var val=document.getElementsByClassName("texttsval4");
					        var q=document.getElementsByClassName("fsval4");
					        for(var i in data){      
					    	if(data[i].id==userida){
					         
					    	var textvalue=val[i].value;
					       //  alert(textvalue);
					         sc(userida,textvalue);
					    	val[i].value="";
					    	q[i].style.display="none";
					        
					    }
					        }
					        
					       }
					        
					        
					        });
					    }

					    	      
				
	
				
		
					    
					    var s1="";
					    var v1="";
					    var o1="";
					    var jie1="";
					    	       s1="<div id='shangjhuif'><div id='shangjto'><span id='shangjname'>商家回复：</span></div><div id='shangjval' class='shangjhuif1'>亲爱的顾客,您的信任是对小店最大的支持,希望小店能给您带来快乐和希望！</div></div>";
					
					        v1="<div id='huif'><div id='value'>"+
					       	"<div id='zhun'>"+
					       	"<img src='' class='user-icon1'>"+
					       	"<span class='username1'>123456</span>"+
					        "</div>"+
					        "<div id='hfnr' class='hfnr11'>买家进入详情页查看，肯定是想看到有关这件商品的更加细致的地方，只有宝贝真的各方面都符合要求之后才会有想要购买的欲望，所以建议商家在详情页第一个模块先进行简短</div>"+
					      "</div>"+"<div class='reftime1'>sdafsadfasdfsad</div>"+"</div>"; 
					      o1="<div class='eval-box'><div class='eval-author'>"+
						            "<div class='port'><img src='' alt='欢迎来到XXX' class='cover b-r501' ></div>"+"<div class='name1'>高***恒</div>"+
										"</div>"+"<div class='eval-content' style='margin-top:18px'>"+
											"<div class='eval-text1' id='neir1'>真是特别美_回头穿了晒图</div>"+
											"<div class='eval-imgs'>"+
										"</div>"+
											"<div class='eval-time'><span class='pltime1'>2017年08月11日 20:31</span></div>"
										+"</div>"+""+"</div>";
	        	
				
				function hpq(x) {
				        var y="";
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:x
					    	},
					        
					        success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
                            	var safa="<a class='huifa1' onclick='huif1("+data[i].id+")'>回复</a>";
					        	var diva="<div id='fshuif' class='fsval2'><div id='fshuif2'><input type='text' class='texttsval2'> <input type='button' value='发送' onclick='fason1("+data[i].id+")'><input type='button' value='取消' onclick='ychuif1("+data[i].id+")'></div></div>";
					       
					        	//alert(data[i].id);
					        	jie1+=o1;
					        	jie1+=safa;
					        	jie1+=diva;
					        				       var shangjgoto=data[i].shop_replies;  
					 for(var n in shangjgoto){
					 	if(shangjgoto[n]!=null){
					 		jie1+=s1;	  
				            
					 	}
					 }
					         go=data[i].zilist;
					         
					        for(var j in go){
					     //   	alert(go[j]);
					         if(go[j]!=null){
					        	jie1+=v1;
					
					        }else{
					        	jie1+="";
					        }
					        }
					        
					      $("#good").html(jie1);
					        } 
					        
					        var usericon1=document.getElementsByClassName("user-icon1");
					        var name=document.getElementsByClassName("username1");
					        var hfnr=document.getElementsByClassName("hfnr11");
					        var reftime=document.getElementsByClassName("reftime1");
					       	   var shangjhuif1=document.getElementsByClassName("shangjhuif1");
					      
					       
					        var w=[];
					        var icon=[];
					        var namezu=[];
					        var neirzu=[];
					        var time=[];
					        var timego2=[]
					        var nei;
					         var ds=[];
                            for(var g in b){
					        var z=b[g].zilist;
					         var zd=b[g].shop_replies;
					        for(var h in z){ 
					       // alert(w.length);
					      //  var max1=Math.max.call(null,...w);
					        	w.push(z[h].user_id);
					        	icon.push(z[h].user_img);
					      	namezu.push(z[h].user_name);
					          	neirzu.push(z[h].reply_content);
					        	time.push(new Date(z[h].comment_time));
					        	
					        var year=time[h].getFullYear();//得到年
					        var month=time[h].getMonth();//得到月
					        var day=time[h].getDay();//得到日
					        var xh=time[h].getHours();//得到小时
					        var fen=time[h].getMinutes();//得到分
					        var timego=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;	
					        timego2.push(timego);
					     //   alert(icon);
					      // var _size=size(w); 
					      // alert(_size);
					//     alert(max1);

                    for (var j=0;j<w.length;j++){
                    	//alert(namezu[j]);
					        	//alert(j);
					     // alert(icon[j]);
					       // alert(usericon1[j].src);
					       // alert(icon[j]);
 					      	usericon1[j].src=icon[j];
					      	name[j].innerHTML=namezu[j];
                            hfnr[j].innerHTML=neirzu[j];	
                            reftime[j].innerHTML=timego2[j];
					      } 

				
					       	}	  
					       	
					       	for(var dsq in zd){
					      	ds.push(zd[dsq].reply_content);
					      }
					      for(var dj=0;dj<ds.length;dj++){
					      	shangjhuif1[dj].innerHTML=ds[dj];
					      	
					      }
					      }
                                  					         
					       for (var i = 0; i < b.length; i++) {
					       
					        var icon1=document.getElementsByClassName("cover b-r501");
					       // icon1[i].src='';
					    //   $(".cover b-r50").attr("src",b[i].icon);
					       	icon1[i].src=b[i].user_img;
					       	var username=document.getElementsByClassName("name1");
					       	username[i].innerHTML=b[i].user_name;
					       	 	var plnr=document.getElementsByClassName("eval-text1");
					        plnr[i].innerHTML=b[i].comment_content;
					        var pltime=document.getElementsByClassName("pltime1");
					       
					        var ptime=b[i].comment_time;
					        var pxtime=new Date(ptime); 
					        var year=pxtime.getFullYear();//得到年
					        var month=pxtime.getMonth();//得到月
					        var day=pxtime.getDay();//得到日
					        var xh=pxtime.getHours();//得到小时
					        var fen=pxtime.getMinutes();//得到分
					        var pxotime=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;
					        //alert(pxotime);
					        pltime[i].innerHTML=pxotime;
		      
					       }
			
					         
					        
					        
                            
                            
					        }
					        });
					        jie1="";
			}
					    var s2="";
					    var v2="";
					    var o2="";
					    var jie2="";
					    	       s2="<div id='shangjhuif'><div id='shangjto'><span id='shangjname'>商家回复：</span></div><div id='shangjval' class='shangjhuif2'>亲爱的顾客,您的信任是对小店最大的支持,希望小店能给您带来快乐和希望！</div></div>";
					
					        v2="<div id='huif'><div id='value'>"+
					       	"<div id='zhun'>"+
					       	"<img src='' class='user-icon12'>"+
					       	"<span class='username12'>123456</span>"+
					        "</div>"+
					        "<div id='hfnr' class='hfnr112'>买家进入详情页查看，肯定是想看到有关这件商品的更加细致的地方，只有宝贝真的各方面都符合要求之后才会有想要购买的欲望，所以建议商家在详情页第一个模块先进行简短</div>"+
					      "</div>"+"<div class='reftime12'>sdafsadfasdfsad</div>"+"</div>"; 
					      o2="<div class='eval-box'><div class='eval-author'>"+
						            "<div class='port'><img src='' alt='欢迎来到XXX' class='cover b-r5012' ></div>"+"<div class='name12'>高***恒</div>"+
										"</div>"+"<div class='eval-content' style='margin-top:18px'>"+
											"<div class='eval-text12' id='neir1'>真是特别美_回头穿了晒图</div>"+
											"<div class='eval-imgs'>"+
										"</div>"+
											"<div class='eval-time'><span class='pltime12'>2017年08月11日 20:31</span></div>"
										+"</div>"+""+"</div>";
	        	
					
					    function zpq(x) {
					    	var y="";
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:x
					    	},
					      success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
                           	var safa="<a class='huifa2' onclick='huif2("+data[i].id+")'>回复</a>";
					        var diva="<div id='fshuif' class='fsval3'><div id='fshuif2'><input type='text' class='texttsval3'> <input type='button' value='发送' onclick='fason2("+data[i].id+")'><input type='button' value='取消' onclick='ychuif2("+data[i].id+")'></div></div>";
					       
					        	//alert(data[i].id);
					        	jie2+=o2;
					            jie2+=safa;
					            jie2+=diva;
					            			       var shangjgoto=data[i].shop_replies;  
					 for(var n in shangjgoto){
					 	if(shangjgoto[n]!=null){
					 		jie2+=s2;	  
				            
					 	}
					 }
					         go=data[i].zilist;
					        for(var j in go){
					     //   	alert(go[j]);
					         if(go[j]!=null){
					        	jie2+=v2;
					
					        }else{
					        	jie2+="";
					        }
					        }
					      $("#normal").html(jie2);
					        } 
					        
					        var usericon1=document.getElementsByClassName("user-icon12");
					        var name=document.getElementsByClassName("username12");
					        var hfnr=document.getElementsByClassName("hfnr112");
					        var reftime=document.getElementsByClassName("reftime12");
					      var shangjhuif1=document.getElementsByClassName("shangjhuif2");
					        var w=[];
					        var icon=[];
					        var namezu=[];
					        var neirzu=[];
					        var time=[];
					        var timego2=[]
					        var nei;
					         var ds=[];
                            for(var g in b){
					        var z=b[g].zilist;
					         var zd=b[g].shop_replies;
					        for(var h in z){ 
					       // alert(w.length);
					      //  var max1=Math.max.call(null,...w);
					        	w.push(z[h].id);
					        	icon.push(z[h].user_img);
					      	namezu.push(z[h].user_name);
					          	neirzu.push(z[h].reply_content);
					        	time.push(new Date(z[h].comment_time));
					        	
					        var year=time[h].getFullYear();//得到年
					        var month=time[h].getMonth();//得到月
					        var day=time[h].getDay();//得到日
					        var xh=time[h].getHours();//得到小时
					        var fen=time[h].getMinutes();//得到分
					        var timego=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;	
					        timego2.push(timego);
					     //   alert(icon);
					      // var _size=size(w); 
					      // alert(_size);
					//     alert(max1);

                    for (var j=0;j<w.length;j++){
                    	//alert(namezu[j]);
					        	//alert(j);
					     // alert(icon[j]);
					       // alert(usericon1[j].src);
					       // alert(icon[j]);
 					      	usericon1[j].src=icon[j];
					      	name[j].innerHTML=namezu[j];
                            hfnr[j].innerHTML=neirzu[j];	
                            reftime[j].innerHTML=timego2[j];
					      } 
                          for(var dsq in zd){
					      	ds.push(zd[dsq].reply_content);
					      }
					
					       	}
                                  for(var dj=0;dj<ds.length;dj++){
					      	shangjhuif1[dj].innerHTML=ds[dj];
					      	
					      } 
					       
					      for(var dj=0;dj<ds.length;dj++){
					      	shangjhuif1[dj].innerHTML=ds[dj];
					      	
					      }
                            }
                            
                        			       for (var i = 0; i < b.length; i++) {
					       
					        var icon1=document.getElementsByClassName("cover b-r5012");
					       // icon1[i].src='';
					    //   $(".cover b-r50").attr("src",b[i].icon);
					       	icon1[i].src=b[i].user_img;
					       	var username=document.getElementsByClassName("name12");
					       	username[i].innerHTML=b[i].user_name;
					       	 	var plnr=document.getElementsByClassName("eval-text12");
					        plnr[i].innerHTML=b[i].comment_content;
					        var pltime=document.getElementsByClassName("pltime12");
					       
					        var ptime=b[i].comment_time;
					        var pxtime=new Date(ptime); 
					        var year=pxtime.getFullYear();//得到年
					        var month=pxtime.getMonth();//得到月
					        var day=pxtime.getDay();//得到日
					        var xh=pxtime.getHours();//得到小时
					        var fen=pxtime.getMinutes();//得到分
					        var pxotime=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;
					        //alert(pxotime);
					        pltime[i].innerHTML=pxotime;
		      
					       }
			
			          					         
	        
                            
                            
					        }
					    
					        });
					      jie2="";
					      
			}
					    
					    var s3="";
					    var v3="";
					    var o3="";
					    var jie3="";
					    	       s3="<div id='shangjhuif'><div id='shangjto'><span id='shangjname'>商家回复：</span></div><div id='shangjval' class='shangjhuif3'>亲爱的顾客,您的信任是对小店最大的支持,希望小店能给您带来快乐和希望！</div></div>";
					
					        v3="<div id='huif'><div id='value'>"+
					       	"<div id='zhun'>"+
					       	"<img src='' class='user-icon13'>"+
					       	"<span class='username13'>123456</span>"+
					        "</div>"+
					        "<div id='hfnr' class='hfnr113'>买家进入详情页查看，肯定是想看到有关这件商品的更加细致的地方，只有宝贝真的各方面都符合要求之后才会有想要购买的欲望，所以建议商家在详情页第一个模块先进行简短</div>"+
					      "</div>"+"<div class='reftime13'>sdafsadfasdfsad</div>"+"</div>"; 
					      o3="<div class='eval-box'><div class='eval-author'>"+
						            "<div class='port'><img src='' alt='欢迎来到XXX' class='cover b-r5013' ></div>"+"<div class='name13'>高***恒</div>"+
										"</div>"+"<div class='eval-content' style='margin-top:18px'>"+
											"<div class='eval-text13' id='neir1'>真是特别美_回头穿了晒图</div>"+
											"<div class='eval-imgs'>"+
									"</div>"+
											"<div class='eval-time'><span class='pltime13'>2017年08月11日 20:31</span></div>"
										+"</div>"+""+"</div>";
	        	
					
					    
					    function cpq(x) {
					    	var y="";
					        $.ajax({
					    	type:"post",
					    	url:"http://localhost:16111/goods/selectcontenthzh",
					    	dataType:"json",
					    	xhrFields:{withCredentials: true},
					    	data:{
					    		id:shangpida,
					    		grade:x
					    	},
					          success:function(b) {
					        var data=eval(b);
					        var go;
					        for(var i in data){
                           	var safa="<a class='huifa3' onclick='huif3("+data[i].id+")'>回复</a>";
					        var diva="<div id='fshuif' class='fsval4'><div id='fshuif2'><input type='text' class='texttsval4'> <input type='button' value='发送' onclick='fason3("+data[i].id+")'><input type='button' value='取消' onclick='ychuif3("+data[i].id+")'></div></div>";
					       
					        	//alert(data[i].id);
					        	jie3+=o3;
					             jie3+=safa;
					             jie3+=diva;
					             			       var shangjgoto=data[i].shop_replies;  
					 for(var n in shangjgoto){
					 	if(shangjgoto[n]!=null){
					 		jie3+=s3;	  
				            
					 	}
					 }
					         go=data[i].zilist;
					        // alert(go);
					        for(var j in go){
					        	//alert(go[j]);
					         if(go[j]!=null){
					        // 	alert(2);
					        	jie3+=v3;
					
					        }else{
					        	jie3+="";
					        }
					        }
					      $("#bad").html(jie3);
					        } 
					        
					        var usericon1=document.getElementsByClassName("user-icon13");
					        var name=document.getElementsByClassName("username13");
					        var hfnr=document.getElementsByClassName("hfnr113");
					        var reftime=document.getElementsByClassName("reftime13");
					      var shangjhuif1=document.getElementsByClassName("shangjhuif3");
					        var w=[];
					        var icon=[];
					        var namezu=[];
					        var neirzu=[];
					        var time=[];
					        var timego2=[]
					        var nei;
					         var ds=[];
                            for(var g in b){
					        var z=b[g].zilist;
					         var zd=b[g].shop_replies;
					        for(var h in z){ 
					       // alert(w.length);
					      //  var max1=Math.max.call(null,...w);
					        	w.push(z[h].user_id);
					        	icon.push(z[h].user_img);
					      	namezu.push(z[h].user_name);
					          	neirzu.push(z[h].reply_content);
					        	time.push(new Date(z[h].comment_time));
					        	
					        var year=time[h].getFullYear();//得到年
					        var month=time[h].getMonth();//得到月
					        var day=time[h].getDay();//得到日
					        var xh=time[h].getHours();//得到小时
					        var fen=time[h].getMinutes();//得到分
					        var timego=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;	
					        timego2.push(timego);
					     //   alert(icon);
					      // var _size=size(w); 
					      // alert(_size);
					//     alert(max1);
				

                    for (var j=0;j<w.length;j++){
                    	//alert(namezu[j]);
					        	//alert(j);
					     // alert(icon[j]);
					       // alert(usericon1[j].src);
					       // alert(icon[j]);
 					      	usericon1[j].src=icon[j];
					      	name[j].innerHTML=namezu[j];
                            hfnr[j].innerHTML=neirzu[j];	
                            reftime[j].innerHTML=timego2[j];
					      } 
					      
                 
					       	}    
					       	for(var dsq in zd){
					      	ds.push(zd[dsq].reply_content);
					      }
					      for(var dj=0;dj<ds.length;dj++){
					      	shangjhuif1[dj].innerHTML=ds[dj];
					      	
					      } 
                              }    					         
				       for (var i = 0; i < b.length; i++) {
					       
					        var icon1=document.getElementsByClassName("cover b-r5013");
					       // icon1[i].src='';
					    //   $(".cover b-r50").attr("src",b[i].icon);
					       	icon1[i].src=b[i].user_img;
					       	var username=document.getElementsByClassName("name13");
					       	username[i].innerHTML=b[i].user_name;
					       	 	var plnr=document.getElementsByClassName("eval-text13");
					        plnr[i].innerHTML=b[i].comment_content;
					        var pltime=document.getElementsByClassName("pltime13");
					       
					        var ptime=b[i].comment_time;
					        var pxtime=new Date(ptime); 
					        var year=pxtime.getFullYear();//得到年
					        var month=pxtime.getMonth();//得到月
					        var day=pxtime.getDay();//得到日
					        var xh=pxtime.getHours();//得到小时
					        var fen=pxtime.getMinutes();//得到分
					        var pxotime=year+"年"+month+"月"+day+"日"+""+xh+":"+fen;
					        //alert(pxotime);
					        pltime[i].innerHTML=pxotime;
		      
					       }
			 
					         
					        
					        
                            
                            
					        }
					    
					        });
					        jie3="";
			}
					    				    
					    function sc(useridb,textvalue) {
					    	//alert(useridb);
					    	//alert(textvalue);
					        $.ajax({
					    		type:"post",
					    		url:"http://localhost:16111/goods/insertreply",
					    		dataType:"json",
					    		xhrFields:{withCredentials: true},
					    		data:{
					    			commodity_id:shangpida,
					    			user_id:userid,
					    			comment_id:useridb,
					    			reply_content:textvalue
					    		    
					    		},
					    	      success:function(data) {
					    	      	  if(data==1){
					    	      //	  	alert("评论成功");
					    	        	qb(shangpida);jie="";
					    	hpq(1);jie1="";
					    	zpq(2);jie2="";
					    	cpq(3);jie3="";
					    	      	  }
					    	      	  else{
					    	      	//  	alert("评论失败");
					    	      	  }
					    	      }   
					    	});
					  
					    	
					    }
						</script>
						<div class="evaluate-content">
							<div class="tab-content">
								<div role="tabpanel" class="tab-pane fade in active" id="all" aria-labelledby="all-tab">
                          
          
									<!-- 分页 -->
									<div class="page text-center clearfix">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a href="">4</a>
										<a href="">5</a>
										<a href="">6</a>
										<a href="">7</a>
										<a href="">8</a>
										<a class="" href="">下一页</a>
										<a class="disabled">1/60页</a>
									</div>
								</div>
								<div role="tabpanel" class="tab-pane fade" id="good" aria-labelledby="good-tab">		
			
										
									<!-- 分页 -->
									<div class="page text-center clearfix">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a href="">4</a>
										<a href="">5</a>
										<a href="">6</a>
										<a href="">7</a>
										<a href="">8</a>
										<a class="" href="">下一页</a>
										<a class="disabled">1/20页</a>
									</div>
								</div>
								<div role="tabpanel" class="tab-pane fade" id="normal" aria-labelledby="normal-tab">
							
             		
									<!-- 分页 -->
									<div class="page text-center clearfix">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a href="">4</a>
										<a href="">5</a>
										<a class="" href="">下一页</a>
										<a class="disabled">1/5页</a>
									</div>
								</div>
								<div role="tabpanel" class="tab-pane fade" id="bad" aria-labelledby="bad-tab">

			
								
									<!-- 分页 -->
									<div class="page text-center clearfix">
											<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a href="">4</a>
										<a href="">5</a>
										<a class="" href="">下一页</a>
										<a class="disabled">1/5页</a>
									</div>
								</div>
								
							</div>
							
							
							<script src="js/jquery.zoom.js"></script>
						</div>
					</div>
					
					
					
					
					
				
			    </div>
			</div>
			<div class="pull-right">
				<div class="tab-content" id="descCate">
					<div role="tabpanel" class="tab-pane fade in active" id="detail-tab" aria-labelledby="detail-tab">
						<div class="descCate-content bgf5">
							<dd class="dc-idsItem selected">
								<a href="#desc-module-1"><i class="iconfont icon-dot"></i> 产品图</a>
							</dd>
							<dd class="dc-idsItem">
								<a href="#desc-module-2"><i class="iconfont icon-selected"></i> 细节图</a>
							</dd>
							<dd class="dc-idsItem">
								<a href="#desc-module-3"><i class="iconfont"></i> 尺寸及试穿</a>
							</dd>
							<dd class="dc-idsItem">
								<a href="#desc-module-4"><i class="iconfont"></i> 模特效果图</a>
							</dd>
							<dd class="dc-idsItem">
								<a href="#desc-module-5"><i class="iconfont"></i> 常见问题</a>
							</dd>
						</div>
					</div>
				
					<div role="tabpanel" class="tab-pane fade" id="service-tab" aria-labelledby="service-tab">
						
					</div>
				</div>
			</div>
			<script>
				$(document).ready(function(){
					$('#descCate').smartFloat(0);
					$('.dc-idsItem').click(function() {
						$(this).addClass('selected').siblings().removeClass('selected');
					});
					$('#item-tabs a[data-toggle="tab"]').on('show.bs.tab', function (e) {
						$('#descCate #' + $(e.target).attr('aria-controls') + '-tab')
						.addClass('in').addClass('active').siblings()
						.removeClass('in').removeClass('active');
					});
				});
			</script>
		</section>
			</div>		
		<!-- 右侧菜单 -->
		<div class="right-nav">
			<ul class="r-with-gotop">
				<li class="r-toolbar-item">
					<a href="udai_welcome.html" class="r-item-hd">
						<i class="iconfont icon-user" data-badge="0"></i>
						<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
					</a>
				</li>
				<li class="r-toolbar-item">
					<a href="udai_shopcart.html" class="r-item-hd">
						<i class="iconfont icon-cart"></i>
						<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
					</a>
				</li>
				<li class="r-toolbar-item">
					<a href="udai_collection.html" class="r-item-hd">
						<i class="iconfont icon-aixin"></i>
						<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
					</a>
				</li>
				<li class="r-toolbar-item">
					<a href="" class="r-item-hd">
						<i class="iconfont icon-liaotian"></i>
						<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
					</a>
				</li>
				<li class="r-toolbar-item">
					<a href="issues.html" class="r-item-hd">
						<i class="iconfont icon-liuyan"></i>
						<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
					</a>
				</li>
				<li class="r-toolbar-item to-top">
					<i class="iconfont icon-top"></i>
					<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
				</li>
			</ul>
			<script>
				$(document).ready(function() {
					$('.to-top').toTop({
						position: false
					})
				});
			</script>
		</div>
		<!-- 底部信息 -->
		<div class="footer">
			<div class="footer-tags">
				<div class="tags-box inner">
					<div class="tag-div">
						<img src="images/icons/footer_1.gif" alt="厂家直供">
					</div>
					<div class="tag-div">
						<img src="images/icons/footer_2.gif" alt="一件代发">
					</div>
					<div class="tag-div">
						<img src="images/icons/footer_3.gif" alt="美工活动支持">
					</div>
					<div class="tag-div">
						<img src="images/icons/footer_4.gif" alt="信誉认证">
					</div>
				</div>
			</div>
			<div class="footer-links inner">
				<dl>
					<dt>XXX</dt>
					<a href="temp_article/udai_article10.html">
						<dd>企业简介</dd>
					</a>
					<a href="temp_article/udai_article11.html">
						<dd>加入U袋</dd>
					</a>
					<a href="temp_article/udai_article12.html">
						<dd>隐私说明</dd>
					</a>
				</dl>
				<dl>
					<dt>服务中心</dt>
					<a href="temp_article/udai_article1.html">
						<dd>售后服务</dd>
					</a>
					<a href="temp_article/udai_article2.html">
						<dd>配送服务</dd>
					</a>
					<a href="temp_article/udai_article3.html">
						<dd>用户协议</dd>
					</a>
					<a href="temp_article/udai_article4.html">
						<dd>常见问题</dd>
					</a>
				</dl>
				<dl>
					<dt>新手上路</dt>
					<a href="temp_article/udai_article5.html">
						<dd>如何成为代理商</dd>
					</a>
					<a href="temp_article/udai_article6.html">
						<dd>代销商上架教程</dd>
					</a>
					<a href="temp_article/udai_article7.html">
						<dd>分销商常见问题</dd>
					</a>
					<a href="temp_article/udai_article8.html">
						<dd>付款账户</dd>
					</a>
				</dl>
			</div>
			<div class="copy-box clearfix">
				<ul class="copy-links">
					<a href="agent_level.html">
						<li>网店代销</li>
					</a>
					<a href="class_room.html">
						<li>U袋学堂</li>
					</a>
					<a href="udai_about.html">
						<li>联系我们</li>
					</a>
					<a href="temp_article/udai_article10.html">
						<li>企业简介</li>
					</a>
					<a href="temp_article/udai_article5.html">
						<li>新手上路</li>
					</a>
				</ul>
				<!-- 版权 -->
				<p class="copyright">
					© 2005-2017 XXX 版权所有，并保留所有权利<br> ICP备案证书号：闽ICP备XXX号-2&nbsp;&nbsp;&nbsp;&nbsp;福建省宁德市XXX&nbsp;&nbsp;&nbsp;&nbsp;Tel: XXX&nbsp;&nbsp;&nbsp;&nbsp;E-mail: XXX@qq.com
				</p>
			</div>
		</div>
	</body>

<script>
	$("#dingdan").load("index_head.html");
		   selects();
     	//模糊查询
     	function selects(){   		
     		$.ajax({
     			type:"get",
     			url:"http://localhost:16111/memurbac/reachbyuseridmemu",
     			dataType:"json", 
     			xhrFields:{withCredentials: true},
     			data:{userid:2},
     			success:function(res){
     				//表示为查询成功，
     				if(res.code==200){

    				
     					   	//添加菜单列表
    		          	
     					for(var i in res.data){
    					    						
     						if(res.data[i].memu_name=="商城主菜单-max"){
    							
     							var data=res.data[i];
     					    //  console.log(JSON.stringify(data))
    							
   							for (var b in data.childMemu) {
   								

   								if(data.childMemu[b].memu_name=="主页"){						
   									str="<a  href=\""+data.childMemu[b].memu_url+"\"><li style=\"color: #f00;\"> "+data.childMemu[b].memu_name+" </li></a>"
   								}else{
   									str="<a href=\""+data.childMemu[b].memu_url+"\"><li> "+data.childMemu[b].memu_name+" </li></a>"
   								}
  								
  								
   								$('#nva-list').html($('#nva-list').html()+str);
   							}
    							
     						}
					
    						
     					}
    					        
    					
     				}else{
    					
     					layui.use("layer", function () {
                 //提示错误信息
     					layer.msg(res.error,{icon:7,time:1000});
              })

    					
    				
    				}
    			},
    			error:function(error){
    			
    				layui.use("layer", function (){
             	//提示错误信息
    				layer.msg(JSON.stringify(error),{icon:2,time:1000});
             })
    				
    			}
    		});
   
    	}
	
	
	   //gfc 不用乱动
	          
	   		function ShowCountDown(jztime, divname,z) {
			var now = new Date();
			var endDate = new Date(Date.parse(jztime.replace(/-/g, "/")));
			var leftTime = endDate.getTime() - now.getTime();
			var leftsecond = parseInt(leftTime / 1000);
			var day1 = Math.floor(leftsecond / (60 * 60 * 24));
			var hour = Math.floor(((leftsecond - day1 * 24 * 60 * 60) / 3600));
			var minute = Math.floor((leftsecond - day1 * 24 * 60 * 60 - hour * 3600) / 60);
			var second = Math.floor(leftsecond - day1 * 24 * 60 * 60 - hour * 3600 - minute * 60);
			if(day1 < 10) {
				day1 = "0" + day1;
			}
			if(hour < 10) {
				hour = "0" + hour;
			}
			if(minute < 10) {
				minute = "0" + minute;
			}
			if(second < 10) {
				second = "0" + second;
			}
			var cc = document.getElementById(divname);
			if(hour*1+(day1*24)==0 && (minute*1)==0 &&(second*1)==0){
				location.reload(true);
			}
			cc.innerHTML = z+"：<span class='wxml4'>" + (hour*1+(day1*24)) + "</span>：<span>" + minute + "</span>：<span>" + second + "</span>";
		}
		
                 	$.ajax({
					url: 'http://localhost:16111/user/g_time',
					type: 'get',
					dataType: 'json',
					data: {'goodsid':id},
					success: function(data) {
						//开始了
						if(data.code==1){
								$("#maosha_").css("display","inline-block");
							window.setInterval(function() {
			                   ShowCountDown(data.data.miao_time2+"", 'timer',"剩余时间");
		                      }, 1000);
		                      //修改价格
		                      
		                      $("#shoppricezhekou").text((document.getElementById("shopprice").innerHTML*1) - (data.data.spikeprice*1))
		                      
						}else if(data.code==2){
						  //等待开始
						  	$("#maosha_").css("display","inline-block");
						var z	= window.setInterval(function() {
			                   ShowCountDown(data.data.miao_time+"", 'timer',"开始时间");
			                   
		                      }, 1000);
						}else{
							console.log("没有活动");
						}
					}
				});
		
</script>
</html>